/*
* Don't support MinGW
* use _DEBUG macro when debugging program
*/

#ifndef __ZUCKTL_BASIC_CONFIG_HPP__
#define __ZUCKTL_BASIC_CONFIG_HPP__

#if _MSC_VER
#define __cplusplus__ _MSVC_LANG
#if __cplusplus__ < 201703L
#error The compiler must at least support CXX17!
#endif

#else // ^^^use msvc compiler^^^
#define __cplusplus__ __cplusplus
#if __cplusplus__ < 201703
#error The compiler must at least support CXX17!
#endif

#endif // ^^^use not msvc compiler^^^

#if __cplusplus__ > 201703L
#define ZCONSTEXPR constexpr
#define ZCONST ZCONSTEXPR
#else
#define ZCONSTEXPR
#define ZCONST const
#endif

namespace zuck
{
	constexpr char version[] = "2.45";

	enum SegmentfaultFlags
	{
		SEG_OutofRange    = 0b001,
		SEG_LengthTooLong = 0b010,
		SEG_BadAlloc      = 0b011,
		SEG_WrongIter     = 0b100,
	};

#ifdef _WIN32
#if _MSC_VER // useing MSVC compiler
#if _DEBUG
	inline bool constexpr debug_ = true;
#else
	inline bool constexpr debug_ = false;
#endif
	inline bool constexpr msvc_ = true;
#else
	inline bool constexpr msvc_ = false;
#endif

#if _WIN64
	using size_t    = unsigned long long;
	using uintptr_t = unsigned long long;
	using ptrdiff_t = long long;
	using intptr_t  = long long;
#else
	using size_t    = unsigned int;
	using uintptr_t = unsigned int;
	using ptrdiff_t = int;
	using intptr_t  = int;
#endif

#elif defined(__linux__)

#ifdef _DEBUG
	inline bool constexpr debug_ = true;
#else
	inline bool constexpr debug_ = false;
#endif

#if __x86_64__
	using size_t    = unsigned long long;
	using ptrdiff_t = long long;
	using uintptr_t = unsigned long long;
	using intptr_t  = long long;
#else
	using size_t    = unsigned int;
	using ptrdiff_t = int;
	using uintptr_t = unsigned int;
	using intptr_t  = int;
#endif

#elif defined(__APPLE__)
	inline bool constexpr clang_ = true;

#ifdef _DEBUG
	inline bool constexpr debug_ = true;
#else
	inline bool constexpr debug_ = false;
#endif

#include <cstddef>
	using size_t    = ::std::size_t;
	using ptrdiff_t = ::std::ptrdiff_t;
	using uintptr_t = ::std::uintptr_t;
	using intptr_t  = ::std::intptr_t;
#endif

}
#endif // !__ZUCKTL_BASIC_CONFIG_HPP__

